<%@page import="java.util.List"%>
<%@page import="com.oea.hibernate.entities.Student"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">

    <jsp:include page="head.jsp"></jsp:include>

        <body style="">
            <!-- topbar starts -->
        <jsp:include page="header.jsp"></jsp:include>
            <!-- topbar ends -->
            <div class="ch-container">
                <div class="row">

                    <!-- left menu starts -->
                <jsp:include page="menu.jsp"></jsp:include>
                    <!-- left menu ends -->

                <jsp:include page="select-division-to-create-timetable-body.jsp"></jsp:include>


                    <!--/span-->


                    <!--/span-->



                    <!-- content ends -->
                </div><!--/#content.col-md-0-->
            </div><!--/fluid-row-->

            <!-- Ad, you can remove it -->

            <!-- Ad ends -->

            <hr>

          



        </div><!--/.fluid-container-->

        <!-- external javascript -->

    <jsp:include page="footer.jsp"></jsp:include>


    <script>
       // window.onload = function() {
            $("#semester_select").change(function() {
                //alert("Val = "+$("#semester_select").val());
                $.ajax({
                    type: "POST",
                    url: "FilterAjaxAction.do",
                    data: "action=getDivisions&branch_id= "+$("#branch_select").val()+"&semester="+$("#semester_select").val(),
                    success: function(data) {
                        console.log(data);
                        data=JSON.parse(data);
                        var html="";
                        $(data).each(function(index,division){
                            html+="<option value="+division.id+">"+division.name+"</option>";
                        });
                         $("#division_select").append(html);  
                        
                       
                    }
                });
            });

           

      //  }
    </script>

    <div id="cboxOverlay" style="display: none;"></div><div id="colorbox" class="" role="dialog" tabindex="-1" style="display: none;"><div id="cboxWrapper"><div><div id="cboxTopLeft" style="float: left;"></div><div id="cboxTopCenter" style="float: left;"></div><div id="cboxTopRight" style="float: left;"></div></div><div style="clear: left;"><div id="cboxMiddleLeft" style="float: left;"></div><div id="cboxContent" style="float: left;"><div id="cboxTitle" style="float: left;"></div><div id="cboxCurrent" style="float: left;"></div><button type="button" id="cboxPrevious"></button><button type="button" id="cboxNext"></button><button id="cboxSlideshow"></button><div id="cboxLoadingOverlay" style="float: left;"></div><div id="cboxLoadingGraphic" style="float: left;"></div></div><div id="cboxMiddleRight" style="float: left;"></div></div><div style="clear: left;"><div id="cboxBottomLeft" style="float: left;"></div><div id="cboxBottomCenter" style="float: left;"></div><div id="cboxBottomRight" style="float: left;"></div></div></div><div style="position: absolute; width: 9999px; visibility: hidden; display: none; max-width: none;"></div></div></body></html>